package com.ycy.send;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.Socket;

public class SendSocketDemo {

  public static void main(String[] args) {

    try {

      Socket socket = new Socket("localhost", 8090);
      InputStream inputStream = socket.getInputStream();
      OutputStream outputStream = socket.getOutputStream();
      PrintWriter printWriter = new PrintWriter(outputStream);
      printWriter.println("hello word！！！ 殷才永");
      printWriter.flush();
      System.out.println("send ！！！");
    } catch (IOException e) {
      e.printStackTrace();
    }


  }

}
